import { ColumnProps } from '~/library/components/ProTable/interface'
import { Inventory } from '~/src/api/interface/goods'

// 表格配置项
export const goodsColumns: ColumnProps<Inventory.GoodsDetail>[] = [
  { type: 'selection', width: 80 },
  { type: 'index', label: '序号', width: 60 },
  { sortable: true, prop: 'barcode', label: '商品条码', align: 'left', width: 200 },
  { sortable: true, prop: 'name', label: '商品名称', align: 'left', minWidth: 230, search: { el: 'input' } },
  { sortable: true, prop: 'productName', label: '规格', minWidth: 120, align: 'left' },
  { sortable: true, prop: 'unitName', label: '单位', minWidth: 120, align: 'left' },
  { sortable: true, prop: 'posPrice', label: '零售价', minWidth: 100, align: 'left' },
  { sortable: true, prop: 'purPrice', label: '采购价', minWidth: 100, align: 'left' },
  { sortable: true, prop: 'categoryName', label: '商品分类', minWidth: 120, align: 'left' },
  { prop: 'operation', label: '操作', width: 145, fixed: 'right' },
]
